﻿using System;
using System.Collections.Generic;
using System.Linq;
using LtccApi.Models;
using Microsoft.AspNetCore.Mvc;

namespace LtccApi.Controllers
{
    /// <summary>
    /// 轮胎品牌API
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class CarBrandController : Controller
    {
        private LtccContext mLtccContext;
        /// <summary>
        /// Initializes a new instance of the <see cref="T:LtccApi.Controllers.CarBrandController"/> class.
        /// </summary>
        /// <param name="ltccContext">Ltcc context.</param>
        public CarBrandController(LtccContext ltccContext)
        {
            mLtccContext = ltccContext;
        }
        /// <summary>
        /// 轮胎品牌列表
        /// </summary>
        /// <returns>The list.</returns>
        [HttpGet]
        public IActionResult List()
        {
            return Ok(mLtccContext.CarBrands.ToList());
        }

    }
}
